package com.wl.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.wl.enums.BrandStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@AllArgsConstructor
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "brand",autoResultMap = true)
public class Brand {

    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;


    @TableField("name")
    private String name;

    @TableField("image")
    private String image;

    @TableField("initial")
    private String initial;

    @TableField("sort")
    private Integer sort;

    @TableField("status")
    private BrandStatusEnum status;

    @TableField(exist = false)
    private Long baseId;
}
